# -*- coding: utf-8 -*-

class FooParent(object):
    def __init__(self):
        self.parent = 'I am the parent'
        print 'Parent'
    
    def bar(self,message):
        print message,'from parent'
        

class FoolChild(FooParent):
    def __init__(self):
        FooParent.__init__(self)
        print 'Child'
    
    def bar(self,message):
        FooParent.bar(self,message)
        print 'child bar function'
        print self.parent
        
class FoolChild_S(FooParent):  
    def __init__(self):  
        super(FoolChild_S,self).__init__()  
        print 'Child'  
          
    def bar(self,message):  
        super(FoolChild_S, self).bar(message)  
        print 'Child bar fuction'  
        print self.parent  
  
if __name__ == '__main__':  
    foolChild = FoolChild()
    foolChild.bar('hello world')
    
    foolChild_s= FoolChild_S()
    foolChild_s.bar('hello world ,i am super object!')